import request from '@/utils/request'

// 分页查询报价单列表
export function deviceManageList(data) {
    return request({
        url: `/device/deviceManageList`,
        method: 'post',
        data
    })
}

//出库
export function issue(data) {
    return request({
        url: `/deviceUse/issue`,
        method: 'post',
        data
    })
}

//入库
export function sendBack(data) {
    return request({
        url: `/deviceUse/sendBack`,
        method: 'post',
        data
    })
}

// 申请设备时任务下拉框
export function jobList(params) {
    return request({
        url: `/deviceUse/jobList`,
        method: 'get',
        params
    })
}
//仪器出库申请
export function issueApplyList(data) {
    return request({
        url: `/deviceUse/issueApplyList`,
        method: 'post',
        data
    })
}
//仪器出库申请详情
export function issueApplyDetail(data) {
    return request({
        url: `/deviceUse/issueApplyDetail`,
        method: 'post',
        data
    })
}

// 仪器申领更改
export function changeDevice(params) {
    return request({
        url: `/deviceUse/changeDevice`,
        method: 'get',
        params
    })
}

// 查询设备树
export function deviceTree(params) {
    return request({
        url: `/device/deviceTree`,
        method: 'get',
        params
    })
}

//仪器批量入库列表
export function sendBackApplyList(data) {
    return request({
        url: `/deviceUse/sendBackApplyList`,
        method: 'post',
        data
    })
}
//仪器批量入库详情
export function sendBackApplyDetail(data) {
    return request({
        url: `/deviceUse/sendBackApplyDetail`,
        method: 'post',
        data
    })
}

// 获取仪器已经占用时间
export function getUseTime(params) {
    return request({
        url: `/deviceUse/getUseTime`,
        method: 'get',
        params
    })
}

// 获取仪器已经占用时间
export function assign(params) {
    return request({
        url: `/deviceUse/assign`,
        method: 'get',
        params
    })
}
// 位置列表
export function roomList(query) {
    return request({
        url: '/room/roomList',
        method: 'get',
        params: query
    })
}

//采样仪器使用记录详情
export function deviceUseDetail(data) {
    return request({
        url: `/deviceUse/deviceUseDetail`,
        method: 'post',
        data
    })
}
